The present invention relates in general to data processing systems, and in particular, to initialize I/O devices of a data processing system as well as a method for initializing I/O devices of a data processing system. In a virtualized system, a single peripheral component interconnect express (PCIe) hardware device may appear as multiple PCIe virtual devices that are each capable of providing virtual functions. Multiple logical partitions in the virtualized system may have access to one or more of the multiple PCIe virtual devices.
When an input/output (I/O) adapter is plugged into a PCIe slot on a computer motherboard, the maximum number of virtual functions that are available for use may vary based on various factors, such as the design of the card, the manufacturer of the card, and the PCIe slot into which the I/O adapter is plugged. For example, the capabilities of the PCIe slot into which the I/O adapter is plugged may affect the maximum number of available virtual functions. In addition, the maximum number of virtual functions associated with each port of the I/O adapter may be set when the virtualized system is initialized. The virtualized system may be reinitialized to reconfigure the maximum number of virtual functions associated with each port of the I/O adapter.
U.S. Pat. No. 8,468,276 B2 discloses a computer-implemented method, which includes initializing a driver associated with an input/output adapter in response to receiving an initialize driver request from a client application. The computer-implemented method includes initializing the input/output adapter to enable adapter capabilities of the input/output adapter to be determined. The computer-implemented method also includes determining the adapter capabilities of the input/output adapter. The computer-implemented method further includes determining slot capabilities of a slot associated with the input/output adapter. The computer-implemented method also includes setting configurable capabilities of the input/output adapter based on the adapter capabilities and the slot capabilities.
U.S. Pat. No. 8,468,276 B2 also discloses a computer program product, which includes a non-transitory computer usable medium having computer usable program code embodied therewith. The computer usable program code is executable by a processor to set configurable capabilities of the input/output adapter based on the adapter capabilities and the slot capabilities. The configurable capabilities include a maximum number of virtual functions associated with the input/output adapter and a maximum number of virtual functions associated with each port of the input/output adapter.
U.S. Pat. No. 8,468,276 B2 further discloses a system, which includes an adapter abstraction layer comprising computer usable program code that is stored at a non-transitory computer usable medium. The adapter abstraction layer is executable by the processor to initialize a driver associated with an input/output adapter in response to receiving an initialize driver request from a client application. The adapter abstraction layer is executable by the processor to initialize the input/output adapter to enable adapter capabilities of the input/output adapter to be determined. The adapter abstraction layer is further executable by the processor to determine the adapter capabilities of the input/output adapter. The adapter abstraction layer is also executable by the processor to determine slot capabilities of a slot associated with the input/output adapter. The adapter abstraction layer is executable by the processor to set configurable capabilities of the input/output adapter based on the adapter capabilities and the slot capabilities. The configurable capabilities include a maximum number of virtual functions associated with the input/output adapter, a maximum number of virtual functions associated with each port of the input/output adapter, a maximum number of queues assigned to each virtual function, a maximum number of interrupts assigned to each virtual function, another parameter associated with the virtual functions, or any combination thereof.